import { Component } from '@angular/core';

import { Router } from '@angular/router'

import { Location } from '@angular/common'

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.less']
})
export class AppComponent {

  constructor(private router: Router) {}

  isCollapsed = true;

  onToDetail(key: string): void {
    console.log('key', key);
    this.router.navigate(['/' + key]);
  }
}
